load("@io_bazel_rules_go//go:def.bzl", "go_library", "go_test")

go_test(
    name = "go_default_test",
    srcs = [
        "ctl_convert_test.go",
        "ctl_create_cr_test.go",
        "ctl_renew_test.go",
        "ctl_status_certificate_test.go",
    ],
    data = glob(["testdata/**"]) + [
        "//deploy/charts/cert-manager:cert-manager.tgz",
    ],
    embed = [":go_default_library"],
    deps = [
        "//cmd/ctl/pkg/convert:go_default_library",
        "//cmd/ctl/pkg/create/certificaterequest:go_default_library",
        "//cmd/ctl/pkg/factory:go_default_library",
        "//cmd/ctl/pkg/renew:go_default_library",
        "//cmd/ctl/pkg/status/certificate:go_default_library",
        "//pkg/api/util:go_default_library",
        "//pkg/apis/acme/v1:go_default_library",
        "//pkg/apis/certmanager/v1:go_default_library",
        "//pkg/apis/meta/v1:go_default_library",
        "//pkg/client/clientset/versioned:go_default_library",
        "//pkg/ctl:go_default_library",
        "//pkg/util/pki:go_default_library",
        "//test/integration/framework:go_default_library",
        "//test/unit/gen:go_default_library",
        "@com_github_sergi_go_diff//diffmatchpatch:go_default_library",
        "@io_k8s_api//core/v1:go_default_library",
        "@io_k8s_apimachinery//pkg/apis/meta/v1:go_default_library",
        "@io_k8s_apimachinery//pkg/util/wait:go_default_library",
        "@io_k8s_cli_runtime//pkg/genericclioptions:go_default_library",
        "@io_k8s_client_go//kubernetes:go_default_library",
        "@io_k8s_client_go//tools/reference:go_default_library",
    ],
)

filegroup(
    name = "package-srcs",
    srcs = glob(["**"]),
    tags = ["automanaged"],
    visibility = ["//visibility:private"],
)

filegroup(
    name = "all-srcs",
    srcs = [
        ":package-srcs",
        "//test/integration/ctl/install_framework:all-srcs",
    ],
    tags = ["automanaged"],
    visibility = ["//visibility:public"],
)

go_library(
    name = "go_default_library",
    srcs = ["ctl_install.go"],
    importpath = "github.com/jetstack/cert-manager/test/integration/ctl",
    visibility = ["//visibility:public"],
    deps = [
        "//cmd/ctl/cmd:go_default_library",
        "//test/integration/ctl/install_framework:go_default_library",
        "//test/internal/util:go_default_library",
        "@com_github_sergi_go_diff//diffmatchpatch:go_default_library",
    ],
)
